parameters:
  osGroup: ''                     # required -- operating system for the job
  osSubgroup: ''                  # optional -- operating system subgroup
  archType: ''                    # required -- targeting CPU architecture
  buildConfig: ''                 # required -- build configuration
  toolName: ''                    # required -- which tool to use: Antigen or Fuzzlyn?

variables:
- template: /eng/pipelines/coreclr/templates/jit-python-variables.yml
  parameters:
    osGroup: ${{ parameters.osGroup }}

- ${{ if in(variables['Build.Reason'], 'Schedule') }}:
  - name: RunReason
    value: 'Scheduled'
- ${{ if notin(variables['Build.Reason'], 'Schedule') }}:
  - name: RunReason
    value: 'PR'
- ${{ if eq(parameters.osGroup, 'windows') }}:
  - name: Core_Root_Dir
    value: '$(Build.SourcesDirectory)\artifacts\tests\coreclr\${{ parameters.osGroup }}.${{ parameters.archType }}.${{ parameters.buildConfig }}\Tests\Core_Root'
  - name: HelixResults
    value: '$(Build.SourcesDirectory)\artifacts\helixresults\'
  - name: IssuesLocation
    value: '$(Build.SourcesDirectory)\artifacts\issues\'
  - name: AntigenLogsLocation
    value: '$(Build.SourcesDirectory)\artifacts\antigen_logs\'
  - name: FuzzlynLogsLocation
    value: '$(Build.SourcesDirectory)\artifacts\fuzzlyn_logs\'

- ${{ if ne(parameters.osGroup, 'windows') }}:
  - name: Core_Root_Dir
    value: '$(Build.SourcesDirectory)/artifacts/tests/coreclr/${{ parameters.osGroup }}.${{ parameters.archType }}.$(buildConfigUpper)/Tests/Core_Root'
  - name: HelixResults
    value: '$(Build.SourcesDirectory)/artifacts/helixresults/'
  - name: IssuesLocation
    value: '$(Build.SourcesDirectory)/artifacts/issues/'
  - name: AntigenLogsLocation
    value: '$(Build.SourcesDirectory)/artifacts/antigen_logs/'
  - name: FuzzlynLogsLocation
    value: '$(Build.SourcesDirectory)/artifacts/fuzzlyn_logs/'

- ${{ if eq(parameters.toolName, 'Antigen') }}:
  - name: SummarizeScript
    value: 'antigen_summarize.py'
  - name: FuzzerLogsLocation
    value: '$(AntigenLogsLocation)'

- ${{ if eq(parameters.toolName, 'Fuzzlyn') }}:
  - name: SummarizeScript
    value: 'fuzzlyn_summarize.py'
  - name: FuzzerLogsLocation
    value: '$(FuzzlynLogsLocation)'
